package com.jpragma.logviewer.actions {
	import com.jpragma.logviewer.events.LogViewerEvent;
	
	public class LogViewerMediator {
		private var _logViewer:JPLogViewer;
		
		public function LogViewerMediator() {
		}

		public function set logViewer(value:JPLogViewer):void {
			_logViewer = value;			
		}
		
		public function onLogMessageAdded(event:LogViewerEvent):void {
			if (!_logViewer.scrollLock) {
				_logViewer.logMessageGrid.callLater(_logViewer.logMessageGrid.scrollToIndex, [int.MAX_VALUE]);
			} 
		}
	}
}